package com.cmc.cloud.cmclink.doc.api.document.req.so;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 订舱货物信息 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SoCargoBaseDto {

    @Schema(description = "外键", requiredMode = Schema.RequiredMode.REQUIRED, example = "28272")
    private Long soId;

    @Schema(description = "货类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotBlank(message = "货类不能为空")
    @Length(max = 5, message = "货类支持最大长度{max}")
    private String cargoType;

    @Schema(description = "HS Code", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "HS Code不能为空")
    @Length(max = 12, message = "HS Code支持最大长度{max}")
    private String hsCode;

    @Schema(description = "英文品名")
    @Length(max = 500, message = "英文品名支持最大长度{max}")
    private String commodityEn;

    @Schema(description = "中文品名")
    @Length(max = 500, message = "中文品名支持最大长度{max}")
    private String commodityCn;

    @Schema(description = "货类子类 如果货类是DRY ，这里就需要再选择子类 是不是液袋货FLEXI、半开门ODO，如果都不是则为空", example = "2")
    @Length(max = 10, message = "货类子类 如果货类是DRY ，这里就需要再选择子类 是不是液袋货FLEXI、半开门ODO，如果都不是则为空支持最大长度{max}")
    private String subCargoType;

    @Schema(description = "预估毛重（kgs）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "预估毛重（kgs）不能为空")
    private BigDecimal grossWeight;

    @Schema(description = "温度（℃） 温度范围在-25℃至25℃ 之间。")
    @Length(max = 4, message = "温度（℃） 温度范围在-25℃至25℃ 之间。支持最大长度{max}")
    private String temperature;

    @Schema(description = "C 摄氏度,F华氏")
    @Length(max = 1, message = "温度单位支持最大长度{max}")
    private String temperatureUnit;

    @Schema(description = "通风度 开度（% Open，范围0~100%）；风量（CHM，单位：m³/h，范围0~999）")
    @Length(max = 50, message = "通风度 开度（% Open，范围0~100%）；风量（CHM，单位：m³/h，范围0~999）支持最大长度{max}")
    private String vantilation;

    @Schema(description = "温度类型")
    @Length(max = 4, message = "温度类型 摄氏度（°C）华氏度（°F）")
    private String temperatureType;

    /**
     * unno
     */
    @Schema(description = "unno")
    private String unNo;
    /**
     * imoclass
     */
    @Schema(description = "imoclass")
    private String imoClass;
    /**
     * 闪点特种货带过来的
     */
    @Schema(description = "闪点特种货带过来的")
    private String flashPoint;
    /**
     * 包装组别三个选项：Ⅰ、Ⅱ、Ⅲ
     */
    @Schema(description = "包装组别三个选项：Ⅰ、Ⅱ、Ⅲ")
    private String packingGroup;
    /**
     * 唛头
     */
    @Schema(description = "唛头")
    private String marks;

    @Schema(description = "货物件数")
    private Integer quantity;

    @Schema(description = "货物尺寸")
    private BigDecimal measurement;

    @Schema(description = "包装代码")
    private String packageCode;
    @Schema(description = "包装描述")
    private String packageDesc;
    @Schema(description = "创建人id")
    @NotBlank(message = "创建人不允许为空")
    private String creator;

}
